{extend name="public/base" /} {block name="body"}
<div class="content-tabs">
	<ol class="breadcrumb">
		<li>
			<a href="{:url('index/index')}"><i class="fa fa-home"></i></a>
		</li>
		<li><strong>商品管理</strong></li>
	</ol>
</div>
<div class="ibox float-e-margins">
	<div class="ibox-content">
		<div class="hr-line-dashed"></div>
		<div class="example-wrap">
			<div class="example">
				<table class="table table-bordered table-hover">
					<thead>
						<tr class="long-th">
							<th>商品名称</th>			
							<th>商品单位</th>
							<th>销售价(元)</th>
							<th>库存</th>
							<th>添加时间</th>
							<th>操作</th>
						</tr>
					</thead>
					<tbody>
						{foreach name="list" item="ad"}
						<tr>
							
							<td class="text-center">{$ad.goods_name}</td>
							<td class="text-center">{$ad.unit}</td>
							<td class="text-center">{$ad.sale_price}</td>
							<td class="text-center">{$ad.stock}</td>
							<td class="text-center">{$ad.add_time}</td>
							<td class="text-center">
									<a onclick="isms('{$ad.id}')" class="btn btn-primary btn-outline">编辑活动</a>
							</td>
							
						</tr>
						{/foreach}
					</tbody>
				</table>
				<div style="text-align: right;">
					{$list->render()}
				</div>
			</div>
		</div>
	</div>
</div>
{/block} {block name="script"}
<script>
	setMenu("web/Show/index");
	//优惠购
	function isagio(id){
		layer.open({		
	  	type: 2, 
	  	id: "agioview",
	 	area: ['850px', '400px'] ,
	 	title: '优惠购栏目商品设置',
	 	scrollbar: false,
	  	content: '/web/show/agioview?id='+id //这里content是一个URL，如果你不想让iframe出现滚动条，你还可以content: ['http://sentsin.com', 'no']
		}); 
	}
	
	//云拼团
	function ispt(id){
		layer.open({		
	  	type: 2, 
	  	id: "ptview",
	 	area: ['850px', '400px'] ,
	 	title: '云拼团栏目商品设置',
	 	scrollbar: false,
	  	content: '/web/show/ptview?id='+id //这里content是一个URL，如果你不想让iframe出现滚动条，你还可以content: ['http://sentsin.com', 'no']
		}); 
	}
	//交友购
	function isjyt(id){
		layer.open({		
	  	type: 2, 
	  	id: "jytview",
	 	area: ['850px', '600px'] ,
	 	title: '交友团栏目商品设置',
	 	scrollbar: false,
	  	content: '/web/show/jytview?id='+id //这里content是一个URL，如果你不想让iframe出现滚动条，你还可以content: ['http://sentsin.com', 'no']
		}); 
	}
	//秒杀
	function isms(id){
		layer.open({		
	  	type: 2, 
	  	id: "msview",
	 	area: ['850px', '550px'] ,
	 	title: '商品活动编辑设置',
	 	scrollbar: false,
	  	content: '/web/show/msview?id='+id //这里content是一个URL，如果你不想让iframe出现滚动条，你还可以content: ['http://sentsin.com', 'no']
		}); 
	}
</script>
<style>
	.bank {
		width: 150px;
		height: 30px;
		text-align: center;
		border-radius: 5px;
	}
</style>
{/block}